package com.moyu.article.domain.post;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.moyu.article.domain.board.Board;
import com.moyu.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.catalina.User;
import org.springframework.data.annotation.Transient;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @Author 赵彦博
 * @Date 2025/3/29 19:03
 */
@Data
@TableName("tb_post")
public class Post extends BaseEntity {

    @TableId(type = IdType.ASSIGN_ID)
    private Long postId;

    private Long boardId;
    private Long userId;
    private String title;
    private String content;
    private Integer visitCount;
    private Integer state;
    private Long createBy;
    private LocalDateTime createTime;
    private Long updateBy;
    private LocalDateTime updateTime;

    @Transient
    private List<Board> boards;
    @Transient
    private String nickName;
    @Transient
    private Boolean isLiked;
    @Transient
    private Integer likeCount;
}
